﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
	var auditData = Jxstar.findComboData('audit');
	var items = [{
		height: '97%',
		width: '97%',
		border: false,
		layout: 'form',
		style: 'padding:10px;',
		items: [{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'trigger', fieldLabel:'合同编号', name:'sj_balance__contract_code',
						anchor:'100%', triggerClass:'x-form-search-trigger',
						maxLength:20, allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', editable:false,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'contract_select', layoutPage:'', sourceField:';', targetField:';', whereSql:"contract_status > '2'", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'1',fieldName:'sj_balance.contract_code'};
							JxSelect.createSelectWin(selcfg, this, 'node_sj_balance_form');
						}},
					{xtype:'textfield', fieldLabel:'合同名称', name:'sj_balance__contract_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'项目名称', name:'sj_balance__project_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'施工单位名称', name:'sj_balance__provider_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'施工单位联系人', name:'sj_balance__provider_user', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'现场负责人', name:'sj_balance__now_manager', anchor:'100%', maxLength:50},
					{xtype:'numberfield', decimalPrecision:6, fieldLabel:'合同金额(万元)', name:'sj_balance__contract_money', readOnly:true, anchor:'100%', maxLength:12},
					{xtype:'textfield', fieldLabel:'送审部门', name:'sj_balance__dept_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'hidden', fieldLabel:'施工单位ID', name:'sj_balance__provider_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'合同ID', name:'sj_balance__contract_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'主键', name:'sj_balance__sj_balanceid', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'送审部门ID', name:'sj_balance__dept_id', anchor:'100%'}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'combo', fieldLabel:'记录状态', name:'sj_balance__auditing', defaultval:'0',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: auditData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: auditData[0][0]},
					{xtype:'textfield', fieldLabel:'项目编号', name:'sj_balance__project_code', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'项目负责人', name:'sj_balance__project_user', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'施工单位资质', name:'sj_balance__provider_level', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'施工单位电话', name:'sj_balance__provider_phone', anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'现场负责电话', name:'sj_balance__now_phone', anchor:'100%', maxLength:50},
					{xtype:'numberfield', decimalPrecision:6, fieldLabel:'送审金额(万元)', name:'sj_balance__send_money', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%', maxLength:12},
					{xtype:'datefield', fieldLabel:'送审日期', name:'sj_balance__send_date', defaultval:'fun_getToday()', format:'Y-m-d', anchor:'100%', readOnly:true},
					{xtype:'hidden', fieldLabel:'结算审计编号', name:'sj_balance__sj_code', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'项目负责人ID', name:'sj_balance__project_userid', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'项目ID', name:'sj_balance__project_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'备注', name:'sj_balance__send_memo', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.99,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textarea', fieldLabel:'送审材料', name:'sj_balance__send_file', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', width:'100%', height:312, maxLength:1000}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'sj_balance'
	};

	var fileDesc = '报送单位需提供如下有关资料(请在“□”内打“√”),并对所提供资料的真实性、合法性和完整性负责：\n' + 				'     □  项目论证报告\n' + 				'     □  项目追加报告\n' + 				'     □  施工单位资格等级证书\n' + 				'     □  招、投标文件\n' + 				'     □  施工合同或协议书\n' + 				'     □  工程变更签证(共            页)\n' + 				'     □  隐蔽工程记录(共            页)\n' + 				'     □  工程施工图纸\n' + 				'     □  设计变更图纸\n' + 				'     □  工程竣工图纸\n' + 				'     □  施工方案\n' + 				'     □  施工日志\n' + 				'     □  工程竣工验收报告\n' + 				'     □  施工单位预(决)算书、工程量计算底稿\n' + 				'     □  其它有关资料(                                          )';		config.initpage = function(formNode){		var event = formNode.event;				//扩展新增前事件		event.on('beforecreate', function(event) {			var form = event.form;			form.set('sj_balance__send_file', fileDesc);			return true;		});	};			config.eventcfg = {		//初始化页面数据		initOther : function() {			var form = this.form;						var fileDesc = form.get('sj_balance__send_file');			if (fileDesc.length == 0) {				form.set('sj_balance__send_file', fileDesc);			}		}	};
	
	return new Jxstar.FormNode(config);
}